import request from '@/utils/request'

// 获取报警日志
export const getAlarmLog = (query) =>
  request({
    url: '/iot/alarm/log',
    method: 'get',
    params: query
  })

export const alarm = (query) =>
  request({
    url: '/iot/alarm/list',
    method: 'get',
    params: query
  })
export const addAlarm = (data) =>
  request({
    url: '/iot/alarm',
    method: 'post',
    data: data
  })
export const putAlarm = (data) =>
  request({
    url: '/iot/alarm',
    method: 'put',
    data: data
  })
export const delAlarm = (data) =>
  request({
    url: `/iot/alarm/${data}`,
    method: 'delete'
  })
